<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('phpcms','header'); ?>
<link href="<?php echo SKIN_PATH;?>product.css" rel="stylesheet" type="text/css" />
<!--begin main-->
<div id="main">
  <!--begin left-->
  <div id="mian_l_1">
    <div class="product_nav_top">
      <h3>产品分类</h3>
    </div>
    <div class="product_nav">
<?php if(is_array($catlist)) foreach($catlist AS $cat) { ?>
<?php $cols=1;?>
<?php if($cat[parentid]==$parentid) { ?>
<dl>
<dt><a href="<?php echo $cat['url'];?>" ><?php echo $cat['catname'];?></a></dt>
<dd><?php if(is_array($catlist)) foreach($catlist AS $childcat) { ?>
<?php if($cols<4 && $childcat[parentid]==$cat[catid]) { ?><a href="<?php echo $childcat['url'];?>" ><?php echo $childcat['catname'];?></a>
<?php $cols++;?>
<?php } ?>
<?php } ?><a href="<?php echo $cat['url'];?>" >>></a>
</dd></dl>
<?php } ?>
<?php } ?>
      <span></span>
      </div>
    <div class="product_nav_btm"></div>
    <div class="product_nav_top mar_10">
      <h3>产品搜索</h3>
    </div>
    <div class="product_nav">
      <ul id="product_search">
        <?php include template('phpcms','product_search_table'); ?>
      </ul>
    </div>
    <div class="product_nav_btm"></div>
<?php echo block("list_$catid", 1);?>
  </div>
  <div id="mian_r_1">
     <div class="bdr_1">
     <p id="position"><a href="">首页</a><?php echo catpos($catid);?>产品列表</p>
      <?php echo tag('phpcms', 'tag_content_product_list', "SELECT a.contentid,a.catid,a.title,a.style,a.thumb,a.keywords,a.userid,a.updatetime,b.unit,b.price,a.description,a.inputtime,a.islink,a.url FROM `phpcms_content` a, `phpcms_c_product` b WHERE a.contentid=b.contentid AND a.status=99   AND a.`thumb`!='' ".get_sql_catid($catid)." ORDER BY a.contentid DESC", $page, 10, array (  'class' => 'url',  'target' => '_blank',  'titlelen' => '28',  'width' => '136',  'height' => '100',), $catid);?>
    </div>
  </div>
</div>
<!--end main-->
<?php include template('phpcms','footer'); ?>